package com.itheima.homework.assignment.Test01;

/**
 * 定一个OldPhone类
 * 定义两个私有属性brand和price,定义空参和有参构造方法,get/set方法
 * 定义一个打电话的方法,传递姓名的参数,方法体内输出给谁打电话
 * 定义一个发短信的方法,直接输出"发短信"
 */
public class OldPhone {
    private String brand;
    private double price;

    public OldPhone() {
    }

    public OldPhone(String brand, double price) {
        this.brand = brand;
        this.price = price;
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public void call(String name) {
        System.out.println("正在连接与" + name + "的通话～");
    }

    public void sendMessage() {
        System.out.println("发短信～");
    }
}
